﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

using Mirror;
namespace MrPP.SampleGame { 
    public class Fire : NetworkBehaviour
    {
        private static Fire Instance_;
        public static Fire Instance
        {
            get
            {
                return Instance_;
            }
        }

        private void Start()
        {

            if (isLocalPlayer)
            {
                Instance_ = this;
            }
        }

        [SerializeField]
        private GameObject _ballPrefab;

        [Command]
        public void CmdFire(Vector3 pos, Quaternion rot)
        {
          //  Debug.LogError("fireBall");
            var ball = Instantiate(_ballPrefab, pos, rot);
            NetworkServer.Spawn(ball);
        }

     
    }
}